<script language="javascript">
wx.config({
    //debug: true,
    appId: '<{$JK.appid}>', // 必填，公众号的唯一标识
    timestamp: <{$JK.timestamp}>, // 必填，生成签名的时间戳
    nonceStr: '<{$JK.noncestr}>', // 必填，生成签名的随机串
    signature: '<{$JK.signature}>',// 必填，签名，见附录1
    jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone']
});

wx.ready(function(){ InitSetting(); });
wx.error(function(res){ });

//设置分享信息
function InitSetting(){
	wx.onMenuShareTimeline({ title: sTitle,  link: sLink, imgUrl: sImg, success: function () {}, cancel: function () {} });
	wx.onMenuShareAppMessage({ title: '', desc: sTitle, link: sLink, imgUrl: sImg,  success: function () {}, cancel: function () {} }); 
	wx.onMenuShareQQ({ title: sTitle, desc: sDesc, link: sLink, imgUrl: sImg, success: function () {}, cancel: function () {} }); 
	wx.onMenuShareWeibo({ title: sTitle,  desc: sDesc,  link: sLink, imgUrl: sImg, success: function () {}, cancel: function () {} }); 
	wx.onMenuShareQZone({ title: sTitle,  desc: sDesc,  link: sLink,  imgUrl: sImg,  success: function () {}, cancel: function () {} });
}
 
</script>